<@_contentList advanced=true categoryId=categoryId modelId=modelId title=title status=1
    parentId=parentId emptyQuote=true containChild=true userId=userId startPublishDate=startPublishDate endPublishDate=.now
    orderField=orderField orderType=orderType pageIndex=pageNum count=numPerPage>
<div class="pageHeader">
    <form class="pagerForm" action="cmsContent/lookup_list.html" onsubmit="return divSearch(this, 'content_list');" method="post">
        <#include "../include_page/parameters.html"/>
        <input type="hidden" name="field" value="${field!'relatedContentId'}"/>
        <input type="hidden" name="categoryId" value="${categoryId!}"/>
        <input type="hidden" name="userId" value="${userId!}"/>
        <input type="hidden" name="parentId" value="${parentId!}"/>
        <div class="searchBar">
            <ul class="searchContent">
                <li>
                    <label><@t.page 'model'/>:</label>
                    <#include "../include_page/modelId.html"/>
                </li>
                <li>
                    <label><@t.page 'publish_date'/>:</label>
                    <input type="text" name="startPublishDate" class="date" size="10" autocomplete="off" dateFmt="yyyy-MM-dd" maxDate="{%y}-%M-{%d}" value="${startPublishDate!}" />
                    <span>-</span>
                    <input type="text" name="endPublishDate" class="date" size="10" autocomplete="off" dateFmt="yyyy-MM-dd" maxDate="{%y}-%M-{%d+1}" value="${endPublishDate!}" />
                </li>
                <li>
                    <label><@t.page 'title'/>:</label>
                    <input type="text" size="40" name="title" value="${title!}" />
                </li>
            </ul>
            <div class="subBar">
                    <ul>
                        <li>
                            <button type="submit" class="buttonActive"><@t.page 'button.search'/></button>
                        </li>
                    </ul>
                </div>
        </div>
    </form>
</div>
<div>
    <table class="list" width="100%" layoutH="109" rel="content_list">
        <thead>
            <tr>
                <th width="30"><@t.page 'use'/></th>
                <th width="30"><@t.page 'id'/></th>
                <th><@t.page 'title'/></th>
                <th><@t.page 'content.promulgator'/></th>
                <th><@t.page 'category'/></th>
                <th><@t.page 'model'/></th>
                <th width="30" orderField="scores" class="<#if orderField??&&'scores'==orderField><#if 'asc'=orderType>asc<#else>desc</#if><#else>order</#if>"><@t.page 'content.score'/></th>
                <th width="30" orderField="comments" class="<#if orderField??&&'comments'==orderField><#if 'asc'=orderType>asc<#else>desc</#if><#else>order</#if>"><@t.page 'content.comments'/></th>
                <th width="30" orderField="clicks" class="<#if orderField??&&'clicks'==orderField><#if 'asc'=orderType>asc<#else>desc</#if><#else>order</#if>"><@t.page 'clicks'/></th>
                <th width="60" orderField="publishDate" class="<#if orderField??&&'publishDate'==orderField><#if 'asc'=orderType>asc<#else>desc</#if><#else>order</#if>"><@t.page 'publish_date'/></th>
                <th width="60"><@t.page 'create_date'/></th>
                <th width="50"><@t.page 'status'/>/<@t.page 'inspector'/></th>
                <th width="40"><@t.page 'content.child'/></th>
            </tr>
        </thead>
        <tbody>
            <#list page.list as a>
                <@t.merge 'userIds' a.userId!/>
                <@t.merge 'checkUserIds' a.checkUserId!/>
                <@t.merge 'categoryIds' a.categoryId!/>
                <@t.merge 'modelIds' a.modelId!/>
            </#list>

            <@_sysUser ids=t.userIds!><#assign userMap=map!/></@_sysUser>
            <@_sysUser ids=t.checkUserIds!><#assign checkUserMap=map!/></@_sysUser>
            <@_category ids=t.categoryIds!><#assign categoryMap=map!/></@_category>
            <@_model ids=t.modelIds!><#assign modelMap=map!/></@_model>

            <#list page.list as a>
            <tr target="sid" rel="${a.id}">
                <td>
                    <a href="javascript:;" class="btnSelect" onclick="$.bringBack({'${field!'relatedContentId'}':'${a.id}', url:'${a.url!}', title:'${a.title?js_string}', description:'${(a.description!)?js_string}'}); return false;"><i class="icon-check-sign icon-large"></i> <@t.page 'select'/></a>
                </td>
                <td>${a.id}</td>
                <td>
                    <a href="${a.url!}" target="_blank">
                        ${(a.copied?then('['+t.pageMessage('copied')+']',''))!}${a.title!}
                    </a>
                </td>
                <td>
                    <a href="cmsContent/lookup_list.html?userId=${a.userId}&field=${field!'relatedContentId'}" target="ajax" rel="content_list">
                        ${(userMap[a.userId?string].nickName)!}
                    </a>
                </td>
                <td>
                    ${(categoryMap[a.categoryId?string].name)!}
                </td>
                <td>
                    <a href="cmsContent/lookup_list.html?modelId=${a.modelId}&field=${field!'relatedContentId'}" target="ajax" rel="content_list">
                        ${(modelMap[a.modelId].name)!}
                    </a>
                </td>
                <td>${a.scores!}</td>
                <td>${a.comments!}</td>
                <td>${a.clicks!}</td>
                <td>${a.publishDate!}</td>
                <td>${a.createDate!}<#if a.updateDate??>/${a.updateDate}</#if></td>
                <td>
                    <@t.page 'status.content.'+a.status/>
                    <#if 2==a.status>/${(checkUserMap[a.checkUserId?string].nickName)!}</#if>
                </td>
                <td>
                    <#if modelMap[a.modelId]?has_content&&modelMap[a.modelId].hasChild>
                        <a href="cmsContent/lookup_list.html?parentId=${a.id}&categoryId=${a.categoryId}&field=${field!'relatedContentId'}" target="ajax" rel="content_list"><@t.page 'content.child_management'/></a>
                    </#if>
                </td>
            </tr>
            </#list>
        </tbody>
    </table>
    <#if page??>
    <div class="pageBar panelBar">
        <div class="pages">
            <span><@t.page 'page_size'/>:</span>
            <select class="combox" name="numPerPage">
                <option value="30"${(page.pageSize=30)?then(' selected="true"','')?no_esc}>30</option>
                <option value="50"${(page.pageSize=50)?then(' selected="true"','')?no_esc}>50</option>
                <option value="100"${(page.pageSize=100)?then(' selected="true"','')?no_esc}>100</option>
            </select>
            <span><@t.page 'total_count' page.totalCount/></span>
        </div>
        <div class="pagination" targetType="dialog" rel="content_list" totalCount="${page.totalCount}" numPerPage="${page.pageSize}" pageNumShown="10" currentPage="${page.pageIndex}"></div>
    </div>
    <script>
    $('select[name=numPerPage]',$.pdialog.getCurrent()).on('change',function(){
        dwzPageBreak({targetType:dialog, numPerPage:this.value});
    });
    </script>
    </#if>
</div>
</@_contentList>